import { kgjHttp as http } from '@/services/http';
import type { SortAndLimit, ListResult } from '@/types/api/common';

/** 活动列表 */
export const activityList = (payload: { data: any; params: SortAndLimit }) =>
  http<ListResult<any>, any, SortAndLimit>({ url: '/api/gold-crm/activity/list', method: 'post', ...payload });

/** 活动编辑 */
export const activityEdit = (data: any) =>
  http<ListResult<any>, any>({ url: '/api/gold-crm/activity/edit', method: 'post', data });

/** 活动添加 */
export const activityAdd = (data: any) =>
  http<ListResult<any>, any>({ url: '/api/gold-crm/activity/add', method: 'post', data });

/** 活动删除 */
export const activityRemove = (id: string) =>
  http<ListResult<any>>({ url: '/api/gold-crm/activity/remove/{id}', method: 'post', args: { id } });
